package com.horizon.concurrent;

import com.horizon.util.ThreadUtil;

import java.util.concurrent.ThreadPoolExecutor;

public class FutureTaskScheduler {
    static ThreadPoolExecutor mixPool = null;
    static {
        mixPool = ThreadUtil.getMixedTargetThreadPool();
    }

    private FutureTaskScheduler() {}

    //添加任务
    public static void add(Runnable executeTask){
        mixPool.submit(()->{executeTask.run();});
    }
}
